<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>OrbbecSDK: header_cn/libobsensor/hpp/Pipeline.hpp 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="orbbec_icon.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">OrbbecSDK
   &#160;<span id="projectnumber">1.8.3</span>
   </div>
   <div id="projectbrief">OrbbecSDK: 奥比中光 3D 相机开发套件</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="pages.html"><span>相关页面</span></a></li>
      <li><a href="namespaces.html"><span>命名空间</span></a></li>
      <li><a href="annotated.html"><span>类</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>文件成员</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_9a5345e98321307492e41331ab8e5636.html">header_cn</a></li><li class="navelem"><a class="el" href="dir_a57403e30bad3723557b0550251f8216.html">libobsensor</a></li><li class="navelem"><a class="el" href="dir_8243e961fc5f523c63be320c0718524a.html">hpp</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Pipeline.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="Pipeline_8hpp.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="Types_8hpp.html">Types.hpp</a>&quot;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &lt;functional&gt;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="keyword">struct </span>PipelineImpl;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="keyword">struct </span>ConfigImpl;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceob.html">ob</a> {</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="keyword">class </span>FrameSet;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">class </span>Frame;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="keyword">class </span>Device;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="keyword">class </span>Playback;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="keyword">class </span>DeviceInfo;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">class </span>Config;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">class </span>StreamProfile;</div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="namespaceob.html#a079312e9113ca7d35fd7ccb68fb7c7fa">   23</a></span>&#160;<span class="keyword">class </span><a class="code" href="classob_1_1StreamProfileList.html">StreamProfileList</a>;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">typedef</span> std::function&lt;void(std::shared_ptr&lt;FrameSet&gt; frame)&gt; <a class="code" href="namespaceob.html#a079312e9113ca7d35fd7ccb68fb7c7fa">FrameSetCallback</a>;</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="classob_1_1Pipeline.html">   30</a></span>&#160;<span class="keyword">class </span><a class="code" href="ObTypes_8h.html#aa0add2ff45ff52cc75dc92d44f883fbf">OB_EXTENSION_API</a> <a class="code" href="classob_1_1Pipeline.html">Pipeline</a> {</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    std::unique_ptr&lt;PipelineImpl&gt; impl_;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <a class="code" href="classob_1_1Pipeline.html">Pipeline</a>();</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <a class="code" href="classob_1_1Pipeline.html">Pipeline</a>(std::shared_ptr&lt;Device&gt; device);</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <a class="code" href="classob_1_1Pipeline.html">Pipeline</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *filename);</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    ~<a class="code" href="classob_1_1Pipeline.html">Pipeline</a>() noexcept;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keywordtype">void</span> start(std::shared_ptr&lt;Config&gt; config);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <span class="keywordtype">void</span> start(std::shared_ptr&lt;Config&gt; config, <a class="code" href="namespaceob.html#a079312e9113ca7d35fd7ccb68fb7c7fa">FrameSetCallback</a> callback);</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <span class="keywordtype">void</span> stop();</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    std::shared_ptr&lt;Config&gt; getConfig();</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    std::shared_ptr&lt;FrameSet&gt; waitForFrames(uint32_t timeout_ms);</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    std::shared_ptr&lt;Device&gt; getDevice();</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    std::shared_ptr&lt;Playback&gt; getPlayback();</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    std::shared_ptr&lt;StreamProfileList&gt; getStreamProfileList(<a class="code" href="ObTypes_8h.html#a0bf6f74f3eaabbf4a71720b9363b2aa8">OBSensorType</a> sensorType);</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="keywordtype">void</span> enableFrameSync();</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <span class="keywordtype">void</span> disableFrameSync();</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    <a class="code" href="structOBCameraParam.html">OBCameraParam</a> getCameraParam();</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <a class="code" href="structOBCameraParam.html">OBCameraParam</a> getCameraParamWithProfile(uint32_t colorWidth, uint32_t colorHeight, uint32_t depthWidth, uint32_t depthHeight);</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    std::shared_ptr&lt;StreamProfileList&gt; getD2CDepthProfileList(std::shared_ptr&lt;StreamProfile&gt; colorProfile, <a class="code" href="ObTypes_8h.html#ade914070120de80d4338ee74e73dc9d5">OBAlignMode</a> alignMode);</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <a class="code" href="structOBRect.html">OBRect</a> getD2CValidArea(uint32_t minimumDistance, uint32_t maximumDistance = 0);</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    <span class="keywordtype">void</span> switchConfig(std::shared_ptr&lt;Config&gt; config);</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <span class="keywordtype">void</span> startRecord(<span class="keyword">const</span> <span class="keywordtype">char</span> *filename);</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    <span class="keywordtype">void</span> stopRecord();</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;};</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;</div><div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="classob_1_1Config.html">  184</a></span>&#160;<span class="keyword">class </span><a class="code" href="ObTypes_8h.html#aa0add2ff45ff52cc75dc92d44f883fbf">OB_EXTENSION_API</a> <a class="code" href="classob_1_1Config.html">Config</a> {</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    std::unique_ptr&lt;ConfigImpl&gt; impl_;</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    <a class="code" href="classob_1_1Config.html">Config</a>();</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    ~<a class="code" href="classob_1_1Config.html">Config</a>() noexcept;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    <span class="keywordtype">void</span> enableStream(std::shared_ptr&lt;StreamProfile&gt; streamProfile);</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    <span class="keywordtype">void</span> enableAllStream();</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    <span class="keywordtype">void</span> disableStream(<a class="code" href="ObTypes_8h.html#a4372502297ded5d6e6ee8db1d71d69d2">OBStreamType</a> streamType);</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    <span class="keywordtype">void</span> disableAllStream();</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    <span class="keywordtype">void</span> setAlignMode(<a class="code" href="ObTypes_8h.html#ade914070120de80d4338ee74e73dc9d5">OBAlignMode</a> mode);</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;    <span class="keywordtype">void</span> setDepthScaleRequire(<span class="keywordtype">bool</span> enable);</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    <span class="keywordtype">void</span> setD2CTargetResolution(uint32_t d2cTargetWidth, uint32_t d2cTargetHeight);</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;</div><div class="line"><a name="l00239"></a><span class="lineno"><a class="line" href="classob_1_1Config.html#af9f0f1adbd5baee7830839447205af8d">  239</a></span>&#160;    <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classob_1_1Pipeline.html">Pipeline</a>;</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;};</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;}  <span class="comment">// namespace ob</span></div><div class="ttc" id="classob_1_1Config_html"><div class="ttname"><a href="classob_1_1Config.html">ob::Config</a></div><div class="ttdoc">Config 类, 用于配置 pipeline 类参数 </div><div class="ttdef"><b>Definition:</b> <a href="Pipeline_8hpp_source.html#l00184">Pipeline.hpp:184</a></div></div>
<div class="ttc" id="namespaceob_html"><div class="ttname"><a href="namespaceob.html">ob</a></div><div class="ttdef"><b>Definition:</b> <a href="Context_8hpp_source.html#l00014">Context.hpp:14</a></div></div>
<div class="ttc" id="namespaceob_html_a079312e9113ca7d35fd7ccb68fb7c7fa"><div class="ttname"><a href="namespaceob.html#a079312e9113ca7d35fd7ccb68fb7c7fa">ob::FrameSetCallback</a></div><div class="ttdeci">std::function&lt; void(std::shared_ptr&lt; FrameSet &gt; frame)&gt; FrameSetCallback</div><div class="ttdef"><b>Definition:</b> <a href="Pipeline_8hpp_source.html#l00023">Pipeline.hpp:23</a></div></div>
<div class="ttc" id="ObTypes_8h_html_a0bf6f74f3eaabbf4a71720b9363b2aa8"><div class="ttname"><a href="ObTypes_8h.html#a0bf6f74f3eaabbf4a71720b9363b2aa8">OBSensorType</a></div><div class="ttdeci">OBSensorType</div><div class="ttdoc">描述传感器类型的枚举值 </div><div class="ttdef"><b>Definition:</b> <a href="ObTypes_8h_source.html#l00150">ObTypes.h:150</a></div></div>
<div class="ttc" id="structOBCameraParam_html"><div class="ttname"><a href="structOBCameraParam.html">OBCameraParam</a></div><div class="ttdoc">相机参数 </div><div class="ttdef"><b>Definition:</b> <a href="ObTypes_8h_source.html#l00368">ObTypes.h:368</a></div></div>
<div class="ttc" id="Types_8hpp_html"><div class="ttname"><a href="Types_8hpp.html">Types.hpp</a></div><div class="ttdoc">提供 SDK 的结构体、枚举常量定义（依赖 libobsensor/h/ObTypes.h） </div></div>
<div class="ttc" id="structOBRect_html"><div class="ttname"><a href="structOBRect.html">OBRect</a></div><div class="ttdoc">矩形 </div><div class="ttdef"><b>Definition:</b> <a href="ObTypes_8h_source.html#l00413">ObTypes.h:413</a></div></div>
<div class="ttc" id="ObTypes_8h_html_a4372502297ded5d6e6ee8db1d71d69d2"><div class="ttname"><a href="ObTypes_8h.html#a4372502297ded5d6e6ee8db1d71d69d2">OBStreamType</a></div><div class="ttdeci">OBStreamType</div><div class="ttdoc">描述数据流类型的枚举值 </div><div class="ttdef"><b>Definition:</b> <a href="ObTypes_8h_source.html#l00165">ObTypes.h:165</a></div></div>
<div class="ttc" id="classob_1_1Pipeline_html"><div class="ttname"><a href="classob_1_1Pipeline.html">ob::Pipeline</a></div><div class="ttdoc">Pipeline 类, 实现开关流、帧同步等 </div><div class="ttdef"><b>Definition:</b> <a href="Pipeline_8hpp_source.html#l00030">Pipeline.hpp:30</a></div></div>
<div class="ttc" id="classob_1_1StreamProfileList_html"><div class="ttname"><a href="classob_1_1StreamProfileList.html">ob::StreamProfileList</a></div><div class="ttdoc">StreamProfileList 类, 通过宽、高、帧率、格式等 获取匹配的 StreamProfile. </div><div class="ttdef"><b>Definition:</b> <a href="StreamProfile_8hpp_source.html#l00182">StreamProfile.hpp:182</a></div></div>
<div class="ttc" id="ObTypes_8h_html_ade914070120de80d4338ee74e73dc9d5"><div class="ttname"><a href="ObTypes_8h.html#ade914070120de80d4338ee74e73dc9d5">OBAlignMode</a></div><div class="ttdeci">OBAlignMode</div><div class="ttdoc">对齐模式 </div><div class="ttdef"><b>Definition:</b> <a href="ObTypes_8h_source.html#l00403">ObTypes.h:403</a></div></div>
<div class="ttc" id="ObTypes_8h_html_aa0add2ff45ff52cc75dc92d44f883fbf"><div class="ttname"><a href="ObTypes_8h.html#aa0add2ff45ff52cc75dc92d44f883fbf">OB_EXTENSION_API</a></div><div class="ttdeci">#define OB_EXTENSION_API</div><div class="ttdef"><b>Definition:</b> <a href="ObTypes_8h_source.html#l00025">ObTypes.h:25</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2023年 十一月 24日 星期五 10:56:17 , 为 OrbbecSDK使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
